<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link href="<c:url value="/css/style.css" />" rel="stylesheet"
		type="text/css" media="screen" />
		<title>購物首頁</title>

		<meta name="viewport" content="width=device-width" />
		<link rel="stylesheet" href="<%=request.getContextPath()%>/css/foundation.css" />
		<script src="<%=request.getContextPath()%>/js/vendor/custom.modernizr.js"></script>

		<style type="text/css">
		#page1{
	 	width:1000px; 
	 	border-radius:45px;
	 	-moz-border-radius:45px;
	 	-webkit-border-radius:45px;
	 	margin: 0 auto;
		padding: 50px 0px 0px 0px;
		border-width:rough;
		border-style:dashed;
		border-color:#FF69B4;
		background-color:#FFD9EC;
	 	}
		#h6{
			text-align: center;
		}
		</style>	
	</head>
	<body>
		<!-- 引入共同的頁首 -->
		
		<c:set var="funcName" value="IND" scope="session" />
		<jsp:include page="/top/top.jsp" />

		<!-- 從這裡開始寫 -->
		<div id="page1">
			<c:if test="${not empty manager}">
                <center>
                	<a href="<c:url value='/shopping/DisplayProduct?action=serch_all&pageNumber=0&type=MANAGER' />">
                	<input type="button" value="影片維護">
                	</a>
                </center>
			</c:if>
	
		<div class="row">
			<div class="large-12 columns">

				<!-- Navigation -->

				<!-- End Navigation -->

				<div class="row">

					<!-- Side Bar -->

					<div class="large-4 small-12 columns">

						<img src="">

						<div class="hide-for-small panel">
							<h2>搜尋</h2>
							<form action="<c:url value='/shopping/DisplayProduct'/>">
								<input type="text" name="pname" autocomplete="off" placeholder="請輸入" size="7" required="required" />
								<input type="submit" value="送出">
								<input type="hidden" name="action" value="search_customer">
								<input type="hidden" name="pageNumber" value="0">
							</form>

							<form method="get" action="<c:url value='/shopping/DisplayProduct'/>">
								<h6>國籍查詢</h6>
								<jsp:useBean id="proCountry" scope="page" class="com.food.dao.service.ProductService"></jsp:useBean>
								<select name="pcountry">
									<option>請選擇</option>
									<c:forEach var="countryName" items="${proCountry.country}">
										<option value="${countryName}">${countryName}</option>
									</c:forEach>	
								</select>
								<input type="submit" value="送出">
								<input type="hidden" name="action" value="search_pcountry">
								<input type="hidden" name="pageNumber" value="0">
							</form>

							<form action="<c:url value='/shopping/DisplayProduct'/>">
								<h6>廚師查詢</h6>
								
								<jsp:useBean id="proCooker" scope="page" class="com.food.dao.service.ProductService"></jsp:useBean>
								<select name="pcooker">
									<option>請選擇</option>
									<c:forEach var="cookername" items="${proCooker.cooker}">
										<option value="${cookername}">${cookername}</option>
									</c:forEach>
								</select>

								<input type="submit" value="送出">
								<input type="hidden" name="action" value="search_pcooker">
								<input type="hidden" name="pageNumber" value="0">
							</form>

						</div>

						
						<div class="panel callout radius">
						<c:if test="${size != 0}">						
							<h6 id="h6">(共${total+1}頁)</h6>
							</c:if>
						</div>
					</div>

					<!-- End Side Bar -->

					<!-- Thumbnails -->
					<div class="large-8 columns">
						<div class="row">
							<c:forEach var="aProductBean" items="${products_Det}">

								<div class="large-4 small-6 columns">
									<div class="flex-video">
										<iframe width="550" height="415" src="${aProductBean.ppath}"
										frameborder="0" allowfullscreen></iframe>
									</div>

									<form method="get" action="<c:url value='/ProductPayServlet'/>">
									<div class="panel">
										<h6>${aProductBean.pid} ${aProductBean.pname}</h6>

										<dl>
											<dt>
												廚師：${aProductBean.pcooker}
											</dt>
											<dt>
												國籍：${aProductBean.pcountry}
											</dt>
										</dl>
										<input type="submit" value="詳細資料">
										<input type="hidden" name="pid" value="${aProductBean.pid}">
									</div>
									</form>
								</div>

							</c:forEach>

						</div>
						<!-- End Thumbnails -->

						<!-- Managed By -->

						<!-- End Managed By -->

					</div>
				</div>

				<!-- Footer -->

				<footer class="row">
					<div class="large-12 columns">
						<hr />
						<div class="row">

							<div class="large-6 columns">
								<p>
									&copy; Copyright no one at all. Go to town.
								</p>
							</div>

							<div class="large-6 columns">
								<ul class="inline-list right">
									<c:if test="${ now != '0'}">
									<li>
										<a href="<c:url value='${first}'/>">第一頁</a>
									</li>
									<li>
										<a href="<c:url value='${pre}'/>">上一頁</a>
									</li>
									</c:if>
									<c:if test="${empty last}">
									<li>
										<a href="<c:url value='${next}'/>">下一頁</a>
									</li>
									<li>
										<a href="<c:url value='${toEnd}'/>">最末頁</a>
									</li>
									</c:if>

									
								</ul>
							</div>

						</div>
					</div>
				</footer>

				<!-- End Footer -->

			</div>
		</div>
</div>
		<!-- 寫到這裡結束 -->

		<div id="footer-wrapper">
			<div id="footer">
				<p>
					Copyright (c) 2010 Sitename.com. All rights reserved. Design by <a
					href="http://www.freecsstemplates.org/" rel="nofollow">FCT</a>.
				</p>
			</div>
		</div>

		<!-- body content here -->

		<script>
			document.write('<script src=' + ('__proto__' in {} ? '../js/vendor/zepto' : '../js/vendor/jquery') + '.js><\/script>')
		</script>

		<script src="<%=request.getContextPath()%>/js/foundation.min.js"></script>
		<%--

		<script src="js/foundation/foundation.js"></script>

		<script src="js/foundation/foundation.dropdown.js"></script>

		<script src="js/foundation/foundation.placeholder.js"></script>

		<script src="js/foundation/foundation.forms.js"></script>

		<script src="js/foundation/foundation.alerts.js"></script>

		<script src="js/foundation/foundation.magellan.js"></script>

		<script src="js/foundation/foundation.reveal.js"></script>

		<script src="js/foundation/foundation.tooltips.js"></script>

		<script src="js/foundation/foundation.clearing.js"></script>

		<script src="js/foundation/foundation.cookie.js"></script>

		<script src="js/foundation/foundation.joyride.js"></script>

		<script src="js/foundation/foundation.orbit.js"></script>

		<script src="js/foundation/foundation.section.js"></script>

		<script src="js/foundation/foundation.topbar.js"></script>

		--%>

		<script>
			$(document).foundation();
		</script>
	</body>
</html>